﻿using Prism.Ioc;
using Prism.Mvvm;
using Prism.Unity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using Zhy.PrismRegion.Base.Views;

namespace Zhy.PrismLesson
{
    /// <summary>
    /// 用于页面注册的类
    /// </summary>
    public class Startup : PrismBootstrapper
    {
        protected override DependencyObject CreateShell()
        {
            // 方式二  简化写法
            return Container.Resolve<MainWindow>();
        }

        protected override void RegisterTypes(IContainerRegistry containerRegistry)
        {
            // 注册需要导航的子页面，只有注册了才能处理
            containerRegistry.RegisterForNavigation<ViewA>(); // 注册内容区域的子页面
            containerRegistry.RegisterForNavigation<ViewB>();
            containerRegistry.RegisterForNavigation<ViewC>();
        }
    }
}
